/*!
 * This file is part of the Semantic MediaWiki Extension
 * @see https://semantic-mediawiki.org/
 *
 * @section LICENSE
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 *
 * @see https://codepen.io/oknoblich/pen/tfjFl
 * @since 3.0
 *
 * @file
 * @ingroup SMW
 *
 * @licence GNU GPL v2+
 * @author mwjames
 */
.smw-tabs {
	margin-top: 10px;
	clear: both;
}

.smw-tabs section, .smw-tabs .subtab-content {
	display: none;
	padding: 0 0 0 0;
	border-top: 1px solid #ddd;
}

.smw-tabs input.nav-tab {
	display: none;
}

.smw-tabs label.nav-label {
	display: inline-block;
	margin: 0 0 -1px;
	padding: 5px 25px;
	font-weight: normal;
	text-align: center;
	color: #bbb;
	border: 1px solid transparent;
}

.smw-tabs label.nav-label:before {
	font-weight: normal;
	margin-right: 10px;
}

.smw-tabs label.nav-label[for*='1']:before { content: ''; }
.smw-tabs label.nav-label[for*='2']:before { content: ''; }
.smw-tabs label.nav-label[for*='3']:before { content: ''; }
.smw-tabs label.nav-label[for*='4']:before { content: ''; }

.smw-tabs label.nav-label:hover {
	color: #888;
	cursor: pointer;
}

.smw-tabs input.nav-tab:checked + label.nav-label {
	color: #24292e;
	border: 1px solid #ddd;
	border-top: 2px solid #337ab7;
	border-bottom: 1px solid #fff;
}

.smw-tabs input.nav-tab:checked + label.nav-label.cached {
    border-top: 2px solid orange;
}

.smw-tab-icon {
	margin-left: -10px;
	margin-right: 10px;
}

.smw-tabs label.nav-label .smw-tab-icon {
	opacity: 0.5;
}

.smw-tabs label.nav-label:hover .smw-tab-icon {
	opacity: 0.7;
}

.smw-tabs input.nav-tab:checked + label.nav-label .smw-tab-icon {
	opacity: 1;
}

/**
 * Responsive settings
 */
@media screen and (max-width: 800px) {
	.smw-tabs {
		display: flex;
		flex-direction: column;
	}

	.smw-tabs label.nav-label {
		text-align: unset;
		padding: 5px 25px;
		border-top: 1px solid;
	}

	.smw-tabs label.nav-label .smw-tab-icon {
		margin-left: 0px;
	}

	.smw-tabs input.nav-tab:checked + label.nav-label {
		border-left: 0px !important;
		border-right: 0px !important;
		background-color: #f9f9f9a8;
	}
}

/**
 * Requires to be adjusted by each set that uses the rules
 * to assign a tab to a content section.
 */
#tab-setup:checked ~ #tab-content-setup,
#tab2:checked ~ #content2,
#tab3:checked ~ #content3,
#tab4:checked ~ #content4 {
	display: block;
}

/**
 * https://codepen.io/markcaron/pen/MvGRYV
 */
.smw-tabset > input[type="radio"] {
  position: absolute;
  left: -200vw;
}

.smw-tabset > input[type="checkbox"] {
  display: none;
}

.smw-tabset .tab-panel {
  display: none;
}

.smw-tabset > input:first-child:checked ~ .tab-panels > .tab-panel:first-child,
.smw-tabset > input:nth-child(3):checked ~ .tab-panels > .tab-panel:nth-child(2),
.smw-tabset > input:nth-child(5):checked ~ .tab-panels > .tab-panel:nth-child(3),
.smw-tabset > input:nth-child(7):checked ~ .tab-panels > .tab-panel:nth-child(4),
.smw-tabset > input:nth-child(9):checked ~ .tab-panels > .tab-panel:nth-child(5),
.smw-tabset > input:nth-child(11):checked ~ .tab-panels > .tab-panel:nth-child(6) {
  display: block;
}

.smw-tabset > label {
  position: relative;
  display: inline-block;
  padding: 15px 15px 25px;
  border: 1px solid transparent;
  border-bottom: 0;
  cursor: pointer;
  font-weight: 300;
  color: #8d8d8d;
  margin-bottom: 0px;
}

.smw-tabset > label::after {
  content: "";
  position: absolute;
  left: 15px;
  bottom: 10px;
  width: 22px;
  height: 4px;
  background: #8d8d8d;
}

.smw-tabset > input:focus + label,
.smw-tabset > input:checked + label {
  color: #06c;
}

.smw-tabset > input:focus + label::after,
.smw-tabset > input:checked + label::after {
  background: #06c;
}

.smw-tabset > input:focus + label.smw-indicator-severity-error::after,
.smw-tabset > input:checked + label.smw-indicator-severity-error::after {
  background: #d33;
}

.smw-tabset > input:focus + label.smw-indicator-severity-warning::after,
.smw-tabset > input:checked + label.smw-indicator-severity-warning::after {
  background: #ffa500;
}

.smw-tabset > label:hover {
  color: #444;
}

.smw-tabset > label:hover::after {
  background: #444;
}

.smw-tabset > input:checked + label {
  border-color: #ccc;
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
  border-top: 2px solid #06c;
}

.smw-tabset > input:checked + label.smw-indicator-severity-error {
  border-top: 2px solid #d33;
  color: #d33;
}

.smw-tabset > input:checked + label.smw-indicator-severity-warning {
  border-top: 2px solid #ffa500;
  color: #ffa500;
}

.tab-panel {
  padding: 30px 0;
  border-top: 1px solid #ccc;
}

.smw-issue-panel > label {
	padding: 2px 5px 5px;
}

.smw-issue-panel > input + label {
	margin-left: 5px;
}

.smw-issue-panel > label::after {
  left: 5px;
  bottom: 3px;
  width: 12px;
  height: 2px;
  background: #8d8d8d;
}

.smw-issue-panel .tab-panel {
	padding: 0 10px 10px 10px;
	overflow-y: auto;
	overflow-x: hidden;
	max-height: 280px;
}

.smw-issue-panel .tab-panel:after2 {
  content: "";
  display: block;
  height: 10px;
  width: 100%;
}
